package abc.utils;

import lombok.extern.slf4j.Slf4j;

import java.util.Map;

@Slf4j
public class ValueUtil {
    public static boolean isPrimitive(Object value) {
        try {
            if(value instanceof Map<?,?>) {
                return false;
            }
            return ((Class) value.getClass().getField("TYPE").get(null)).isPrimitive();
        } catch (IllegalAccessException | NoSuchFieldException e) {
            log.error(e.getMessage(), e);
        }
        return false;
    }
}
